package au.org.nh.form;

import java.util.List;

import au.org.nh.dao.PatientInfo;
import au.org.nh.dao.PatientInfoDAO;
import au.org.nh.dao.hsqldb.impl.HSQLDBPatientInfoDAOImpl;

/**
 * @author amith.nambiar
 * 
 */
public class ListPatientInfoAction {
	private List<PatientInfo> patientInfoList;

	/* TODO : Inject the dependency using IoC Container */
	private final PatientInfoDAO patientInfoDAO = new HSQLDBPatientInfoDAOImpl();

	public String execute() {
		patientInfoList = (List<PatientInfo>) patientInfoDAO.getAll();
		return "view";
	}

	public List<PatientInfo> getPatientInfoList() {
		return patientInfoList;
	}
}
